package com.ruoyi.system.domain.module.property;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.system.domain.module.wx.WxUser;
import com.ruoyi.system.domain.module.estate.Estate;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.ibatis.type.JdbcType;

import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;

/**
 * 物业费订单对象 property_fee_order
 *
 * @author ruoyi
 * @date 2021-08-24
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("property_fee_order")
public class PropertyFeeOrder implements Serializable {

    private static final long serialVersionUID=1L;


    /**
     * $column.columnComment
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    /**
     * $column.columnComment
     */
    private String orderNo;
	private Integer roomId;
	private String platform;

	/**
	 *  支付方式  0  -微信支付  1 - 农商行支付
	 */
    private Integer payPlatform;

	@Excel(name = "支付方式")
	@TableField(exist = false)
	private String payPlatformName;

    private Integer payPlatformId;
    /**
     * 小区id
     */
    private Integer estateId;

	@Excel(name = "小区名称")
    private String estateName;

    private String propertyName;

    /**
     * 物业id
     */
    private Integer propertyId;

    /** 本户人口数 */
//    @Excel(name = "户内人数")
    private Integer peopleCount;

    /**
     * 用户id
     */
    private Integer userId;

	@Excel(name = "微信昵称")
    private String nickName;

	@Excel(name = "真实姓名")
    private String realName;

	/**
	 * 业主电话
	 */
	@Excel(name = "业主电话")
    private String phoneNum;


	/**
	 * 房屋类型  0 - 高层 1 - 低层 2- 商业 3 - 别墅 4 - 其他
	 */
    private Integer roomType;


	@Excel(name = "楼宇房间号")
    private String roomNo;

	/**
	 * 物业费缴纳的实用面积数
	 */
    private Double roomAreas;

    /**
     * 缴纳的月份数
     */
//	@Excel(name = "缴纳月份数")
    private Integer months;


	@Excel(name = "物业费交费月数")
	@TableField(exist = false)
	private String wyfMonths;

	@Excel(name = "水费交费月数")
	@TableField(exist = false)
	private String waterMonths;

	@Excel(name = "水费交费起止数")
	@TableField(exist = false)
	private String waterNum;

	@Excel(name = "电费交费月数")
	@TableField(exist = false)
	private String electricMonths;

	@Excel(name = "车位费交费月数")
	@TableField(exist = false)
	private String carMonths;


	/**
     * 物业费金额
     */
    private BigDecimal wyfSinglePrice;
    /**
     * 物业费金额
     */
	@Excel(name = "物业费金额")
    private BigDecimal wyfFee;


	/**
	 *  物业费折扣
	 */
	@Excel(name = "物业费折扣")
	private BigDecimal wyfYhRate;

	/**
	 *   物业费  折扣优惠的价格
	 */
	@Excel(name = "物业费优惠金额")
	private BigDecimal wyfYhPrice;

	/**
     * 代收水费
     */
	@Excel(name = "代收水费")
    private BigDecimal waterFee;

	/**
	 *  水费单价
	 */
	private BigDecimal waterSinglePrice;

	/**
	 * 加压费
	 */
	@Excel(name = "加压费")
	private BigDecimal jiaYaFee;

	/**
	 *  加压优惠
	 */
	@Excel(name = "加压优惠")
	private BigDecimal jiaYaYouhui;

	/**
	 * 车位费
	 */
	@Excel(name = "车位费")
	private BigDecimal carFee;


	/**
	 *  车位优惠
	 */
	@Excel(name = "车位优惠")
	private BigDecimal carYouhui;
	/**
	 *  车位费单价
	 */
	private BigDecimal carSinglePrice;

    /**
     * 垃圾处理费
     */
	@Excel(name = "垃圾处理费")
    private BigDecimal trashFee;

	/**
	 *  垃圾处理费优惠
	 */
	@Excel(name = "垃圾处理费优惠")
	private BigDecimal trashYouhui;

    /**
     * 代收电费
     */
	@Excel(name = "代收电费")
    private BigDecimal electricFee;

	/**
	 *  代收电费单价
	 */
	private BigDecimal electricSinglePrice;


	@Excel(name = "优惠金额")
    private BigDecimal freeMoney;

    /**
     * 缴纳开始周期的时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date beginTime;


	private Long accountOrderId;

	@Excel(name = "套内账户")
	private Double accountFee;
    /**
     * 缴纳结束周期的时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /**
	 * 订单状态   0 - 交费申请 1 - 已生成交费清单    2 - 待支付  3- 支付中  4 - 已支付 5 - 订单取消   6 - 已发起退款  7 - 退款成功 8 - 退款失败
     */
    private Integer state;


	@Excel(name = "交费状态")
	@TableField(exist = false)
	private String stateStr;

    /**
     * 使用积分数量
     */
	@Excel(name = "使用积分数量")
    private Double useIntegral;

    private Double dkRate;

	/**
	 * 总需要支付金额
	 */
	@Excel(name = "总需要支付金额")
	private BigDecimal totalMoney;

    /**
     * 最终支付的金额
     */
	@Excel(name = "最终支付金额")
    private BigDecimal payMoney;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;


    /**
     * 订单创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 微信支付流水订单号
     */
    private String transactionId;

    /**
     * 微信订单号
     */
    private String outTradeNo;

    /**
     * $column.columnComment
     */
    private String mchId;

	private Long handleSysUserId;

	/**
	 *  订单处理人受理人
	 */
	@Excel(name = "受理人")
	private String handleUserName;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date handleTime;

	/**
	 *是否开具纸质收据  0 - 未开具  1- 已开具
	 */
	private Integer isOpenReceipt;

	/**
	 *收据的图片地址
	 */
	private String receiptImgUrl;

	/**
	 *  收据的文件地址
	 */
	private String receiptFilePath;

	/**
	 *  备注信息
	 */
	@Excel(name = "备注信息")
	@TableField(updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.VARCHAR)
	private String remark;


	/**
	 *  退款订单号
	 */
	private String refundOutTradeNo;
	/**
	 *  退款流水号
	 */
	private String refundTransactionId;
	/**
	 *  退款状态  0 未退款 1 申请中 2 已退款  3 - 退款失败
	 */
	private Integer refundStatus;
	/**
	 *  退款理由
	 */
	private String refundReason;
	/**
	 *  退款 金额
	 */
	private BigDecimal refundPrice;
	/**
	 *  退款时间
	 */
	private String refundTime;
	/**
	 *  退款 响应信息
	 */
	private String refundRespParam;

	private Integer isDel;


	@TableField(exist = false)
	private String receiptImgUrlPath;


	@TableField(exist = false)
    private String[] dateRange;

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date[] dateRangeTime;

    @TableField(exist = false)
    private Estate estate;
	@TableField(exist = false)
	private List<WxUser> wxUsers;

    @TableField(exist = false)
    private String beginDate;

    @TableField(exist = false)
    private String endDate;

    @TableField(exist = false)
    private Integer saveType;

	@Excel(name = "支付时间")
	@TableField(exist = false)
	private String payTimeStr;

	@TableField(exist = false)
	List<PropertyFeeOrderInfo> orderInfoList;

	@TableField(exist = false)
	List<PropertyFeeOrderTemplate> templates;

	@TableField(exist = false)
	List<Integer> ids;

	@TableField(exist = false)
	Integer type;
}
